package com.xyf.sys.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
public class Order {
    private String id;

    private String outTradeNo;

    private Integer productCategory;

    /**
     *  1 快递订单 2 普通订单 3  4
     */
    private Integer orderType;

    private String orderCode;

    private String appid;

    private String userId;

    private String regimentId;

    private String payerId;

    private Long deptId;

    private String driverReceiverId;

    private String driverSenderId;

    private String factoryId;

    private String mobile;

    private String pickUpType;

    @ApiModelProperty("支付状态 0 未支付 1 已支付 2 支付失败")
    private Integer payStatus;

    @ApiModelProperty(value = "订单状态", allowableValues = "0已下单,1待付款,2已付款,3退款中,4已退款5 已取消6 已完成")
    private Integer orderStatus;

    private String describe;

    private BigDecimal totalPrice;

    private Integer printTimes;

    private Long printerId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date orderTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date callbackTime;

    private String transactionId;

    private String refundTransactionId;

    private BigDecimal refundPrice;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date refundTime;

    @ApiModelProperty("退款状态 SUCCESS—2 退款成功 - CLOSED—4 退款关闭 - PROCESSING—1 退款处理中 - ABNORMAL— 3退款异常")
    private Integer refundStatus;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date refundCallbackTime;

    private String refundUserId;

    private String outRefundNo;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date lastPrintTime;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date pickUpDate;

    private String pickUpRange;

    private String orderImg;

    private Integer smsTimes;

    /**
     *  0 待发货 1 待收货 2 已签收
     */
    private Integer deliveryStatus;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date shippedTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date receiveTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date lastUpdateTime;

    private Long logisticPriceSchemeId;

    private String delFlag;

    private String createBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    private String updateBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    private String remark;

    public String getRemark() {
        return remark == null ? "" : remark.trim();
    }

    private List<Goods> outOfStockList;
}